package com.example.mongodb.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "sys_user")
@Data
public class User implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6222878959009646760L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
	
    @Column(name = "user_name", nullable = false, unique = true)
    private String userName;
    
    @Column(name = "pwd", nullable = false)
    private String passWord;
    
    @Column(name = "email", nullable = false)
    private String email;
    
    @Column(name = "nick_name", nullable = true)
    private String nickName;
    
    @Column(name = "reg_time", nullable = false)
    private Date regTime;
}
